import React from 'react';
import {BrowserRouter,Route,Link} from 'react-router-dom'
import Home from './Home/index'
import Detail from './Detail/detail'
export default function App() {
  return (
    <BrowserRouter>
      <div>
        <Link to="/home">首页</Link>
        <Link to="/detail">详情页</Link>
        {/* 使用Route配置路由规则 */}
        <Route path="/home" component={Home}></Route>
        <Route path="/detail" component={Detail}></Route>
      </div>
    </BrowserRouter>
  );
}
